-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: None padding order, adding otherjets in Wc WF #60
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mondalspandan thank you very much for the changes and also find out the type bug!
Generally I have one comment and two question
💬 I would suggest all the boolean
should do ak.fill_none(boolean,False)
to remove None
values
❓ I had the impression you want to store the flag (isMuJet
) in the tree instead of the skimmed object(MuonJet, OtherJets
), is this still the case?
❓ Did you plan to include the LHE NJet cut for the jet split sample? I have an idea the Njet split can be triggered when checking through all the dataset in runner step.
jet_sel = jet_id(events, self._campaign) & ( | ||
ak.all(events.Jet.metric_table(iso_muon) > 0.5, axis=2) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the additional ak.fill_none
for the selection to avoid None
in the jet selection. (just to be sure None
filtered out 😉 )
) | ||
) | ||
mujetsel = ( | ||
(ak.all(event_jet.metric_table(soft_muon) <= 0.4, axis=2)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mask_identity=True
should be there to avoid None
events pass True
criteria.
The ak.fill_none(mujetsel,False,axis=-1)
then remove None
, this cut can be proceed anywhere. (Then you don't need mujetsel2
)
@@ -518,7 +513,7 @@ def process_shift(self, events, shift_name): | |||
out_branch, | |||
np.where( | |||
(out_branch == "SoftMuon") | |||
| (out_branch == "MuonJet") | |||
# | (out_branch == "MuonJet") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did I understand correctly you want to store PFcands in the MuonJet
collection so you commented out?(also OtherJets
also not included)
@@ -528,7 +523,7 @@ def process_shift(self, events, shift_name): | |||
"Muon", | |||
"Jet", | |||
"SoftMuon", | |||
"MuonJet", | |||
# "MuonJet", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The kinematics variables will not save, is this done intentionally?
@@ -544,6 +539,7 @@ def process_shift(self, events, shift_name): | |||
out_branch, ["Jet_btagDeep*", "Jet_DeepJet*", "PFCands_*", "SV_*"] | |||
) | |||
# write to root files | |||
print("Branches to write:", out_branch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the check you want to keep when running the code?
Indeed the out_branch
also contains some regexp which not really returns full variable. Maybe would be interesting to check with fout["Events"].fields
for check all the entries
pruned_ev["MuonJet"] = smuon_jet | ||
pruned_ev["SoftMuon"] = ssmu | ||
pruned_ev["OtherJets"] = sotherjets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you still want to store the jet flag instead of collections on MuonJet & OtherJet? The mujetsel
can still considered as a flag in the Jet variables
@@ -523,7 +514,7 @@ def process_shift(self, events, shift_name): | |||
"Muon", | |||
"Jet", | |||
"SoftMuon", | |||
"MuonJet", | |||
# "MuonJet", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The kinematics variables will not save, is this done intentionally?
@@ -539,6 +530,7 @@ def process_shift(self, events, shift_name): | |||
out_branch, ["Jet_btagDeep*", "Jet_DeepJet*", "PFCands_*", "SV_*"] | |||
) | |||
# write to root files | |||
print("Branches to write:", out_branch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the check you want to keep when running the code?
Indeed the out_branch
also contains some regexp which not really returns full variable. Maybe would be interesting to check with fout["Events"].fields
for check all the entries
| (out_branch == "MuonJet") | ||
# | (out_branch == "MuonJet") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did I understand correctly you want to store PFcands in the MuonJet
collection so you commented out?(also OtherJets
also not included)
pruned_ev["Jet"] = sjets | ||
pruned_ev["Muon"] = shmu | ||
pruned_ev["MuonJet"] = smuon_jet | ||
pruned_ev["OtherJets"] = sotherjets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you still want to store the jet flag instead of collections on MuonJet & OtherJet? The mujetsel
can still considered as a flag in the Jet variables
@mondalspandan and @Ming-Yan what is the current status of this PR? |
Hi, I stopped working on it because my base branch diverged. Ming-Yan made a PR after this. @Ming-Yan Did you also fix the None padding issue or is it still present in the master? |
Hi @mondalspandan , indeed I fix the padding issue in the master PR. |
Then I think this PR can be deleted :) |
No description provided.